<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #top{
            text-align: center;
        }
        #title{
            background: #c3c3c3;
            text-align: center;
        }
        td{
            text-align: center;
        }
        .context:nth-child(even){
            background: #efe3af;
        }
    </style>
</head>
<body>
<div id="top">
    部门名称：
    <select style="width: 80px" id="departmentId">
        <option value="0">全部</option>
        <option th:each="department:${session.departments}"
                th:value="${department.id}"
                th:text="${department.name}"
                th:selected="${department.id == session.id}">
        </option>
    </select>
    <input type="button" value="查询" id="queryInfo">
    <input type="button" value="新增人员" id="addInfo">
</div>
<div>
    <table border="1" width="100%">
        <tr id="title">
            <td colspan="6">
                <h2>人才信息列表</h2>
            </td>
        </tr>
        <tr>
            <th>人才编号</th>
            <th>人才姓名</th>
            <th>工作年限</th>
            <th>所属部门</th>
            <th>毕业学校</th>
            <th>操作</th>
        </tr>
        <tr th:each="talent:${session.talents}" class="context">
            <td th:text="${talent.id}"></td>
            <td th:text="${talent.name}"></td>
            <td th:text="${talent.workingLife}"></td>
            <td th:text="${talent.department.name}">无</td>
            <td th:text="${talent.graduateSchool}"></td>
            <td>
                <a th:href="@{/getEnterpriseTalentByUpdate/{id}(id=${talent.id})}">修改</a>
                <a th:href="@{/deleteEnterpriseTalent/{id}(id=${talent.id})}">删除</a>
            </td>
        </tr>
        <tr>
            <td colspan="6">

            </td>
        </tr>
    </table>
</div>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</body>
</html>